// import Cookies from 'js-cookie'

// const TokenKey = 'vue_admin_template_token'

// export function getToken() {
//   return Cookies.get(TokenKey)
// }

// export function setToken(token) {
//   return Cookies.set(TokenKey, token)
// }

// export function removeToken() {
//   return Cookies.remove(TokenKey)
// }
//存储token 此处存的是id用于查询信息
const TokenKey = "vue_admin_template_token";

export function getToken() {
  return sessionStorage.getItem(TokenKey);
}

export function setToken(token) {
  return sessionStorage.setItem(TokenKey, token);
}

export function removeToken() {
  return sessionStorage.removeItem(TokenKey);
}

const RoleKey = "vue_admin_template_role";
export function getRole() {
  return sessionStorage.getItem(RoleKey);
}

export function setRole(Role) {
  return sessionStorage.setItem(RoleKey, Role);
}

export function removeRole() {
  return sessionStorage.removeItem(RoleKey);
}
